/*
 * Created by IntelliJ IDEA.
 * User: amrk
 * Date: 23/02/2004
 * Time: 20:51:14
 */
package com.talios.jira.idea;

import org.jdom.Attribute;
import org.jdom.Element;

public class JDomSupport {
    /**
     * @jira INTPLUG-4 Support for Multiple Projects
     */
    public static String getAttributeWithDefault(Element element, String attributeName, String defaultValue) {
        Attribute attribute = element.getAttribute(attributeName);
        return attribute == null ? defaultValue : attribute.getValue();
    }
}